﻿using ChongJu.ModelManager.Alarm;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;

namespace ChoJu.Converters.Alarm
{
    public class TitleColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var type = (AlarmEnum)value;
            switch (type)
            {
                case AlarmEnum.Error: return Brushes.Red;
                case AlarmEnum.Warning: return Brushes.Orange;
                default: return Brushes.Black;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}